package com.itheima.controller;


import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author weizhongli
 * @Date 2020/4/24
 * @Version v1.0
 * @Description
 **/
@RestController
public class FeignController {

    //注入Feign客户端接口
    @Autowired
    private UserService userService;

    @GetMapping("/feignconsumer/{id}")
    public User findUserById(@PathVariable Integer id) {
        return userService.findUserById(id);
    }



}
